/*
 * All rights Reserved, Designed By HerDao
 * Copyright:    Copyright(C) 2020-2099
 * Company:      HerDao Ltd.
 */
package com.boots.easyexcel.normal;

import java.util.Date;
import java.util.List;

import com.alibaba.excel.EasyExcel;
import com.google.common.collect.Lists;

/**
 * 普通数据导出
 * @author：OprCalf
 * @date：2021-1-11 17:25:43
 */
public class NormalExport {

    public static void main(String args[]) {
        // 创建用户列表
        final List<Users> users = Lists.newArrayList();
        // 新增用户列表
        users.add(new Users(1, "hhh", "小红", "hhh.jpg", new Date(), 64345.2342));
        users.add(new Users(2, "aaa", "小军", "hhh.jpg", new Date(), 64567.2342));
        users.add(new Users(3, "sss", "小化", "hhh.jpg", new Date(), 64234.2342));
        users.add(new Users(4, "ddd", "小天", "hhh.jpg", new Date(), 243132.2342));
        users.add(new Users(5, "fff", "小白", "hhh.jpg", new Date(), 21341324.2342));
        // 初始化文件位置
        final String fileName = "D:\\normal.xlsx";
        // 生成文件
        EasyExcel.write(fileName, Users.class).sheet("用户信息").doWrite(users);
    }

}
